package com.example.coupon.controller;

import com.example.coupon.service.CouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CouponController {

    @Autowired
    private CouponService couponService;

    @RequestMapping("/obtainCoupon")
    public String obtainCoupon(@RequestParam Long userId, @RequestParam Long couponId){
        return couponService.obtainCoupon(userId, couponId);
    }
}